﻿namespace task2
{
    class Program
    {
        static void Main(string[] args)
        {
            Clock clock = new Clock();  // 带倒计时功能的时钟
            clock.Alarm += (S, E) => { Console.WriteLine("Alarmed!"); };
            clock.Tick += (S, E) => { Console.WriteLine($"Time: {DateTime.Now:hh:mm:ss}"); };
            clock.CheckPoint = 5;      // 设定倒计时：5秒
            clock.Start();

            Console.Read();
        }
    }
}